home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 8
/
Amoszine 8 (Disk 2 of 3).adf
/
Powerbobs.lha
/
powerbobsv1.0
/
examples
/
MulShift_Array.Asc
< prev
next >
Wrap
Text File
|
1995-06-30
|
892b
|
45 lines
Set Buffer 20
Screen Open 0,320,256,32,L
Dim X(4000),_SIN(360)
For I=0 To 4000
X(I)=I
Next
Degree
For I=0 To 360
_SIN(I)=Sin(I)*1024
Next
Input "Enter angle (0 -> 359) : ";ANGLE
Locate 0,0
_SINUS=_SIN(ANGLE)
T=Timer
Pmul Shift Varptr(X(0)),Varptr(X(0)),_SINUS,10,0 To 4000
Print "Time used with new routine :";Timer-T
For I=1 To 10
Locate 2,I+5 : Print X(I)
Next
For I=3990 To 4000
Locate 2,I-3974 : Print X(I)
Next
For I=0 To 4000
X(I)=I
Next
T=Timer
For I=0 To 4000
X(I)=(X(I)*_SINUS)/1024
Next
Locate 0,1
Print "Time used with scaled Amos :";Timer-T
Cdown
Print "First ten values..."
For I=1 To 10
Locate 15,I+5 : Print X(I)
Locate 28,I+5 : Print I*Sin(ANGLE)
Next
Print "Last ten values..."
For I=3991 To 4000
Locate 15,I-3974 : Print X(I)
Locate 28,I-3974 : Print I*Sin(ANGLE)
Next
Locate 0,5 : Print "PowerBobs Scaled Amos Normal Amos"
End